package com.ruoyi.finance.mapper;

import java.util.List;
import com.ruoyi.finance.domain.PaymentSlips;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 付款单Mapper接口
 * 
 * @author ruoyi
 * @date 2023-11-29
 */
@Mapper
public interface PaymentSlipsMapper 
{
    /**
     * 查询付款单
     * 
     * @param paymentId 付款单主键
     * @return 付款单
     */
    public PaymentSlips selectPaymentSlipsByPaymentId(Long paymentId);

    /**
     * 查询付款单列表
     * 
     * @param paymentSlips 付款单
     * @return 付款单集合
     */
    public List<PaymentSlips> selectPaymentSlipsList(PaymentSlips paymentSlips);

    /**
     * 新增付款单
     * 
     * @param paymentSlips 付款单
     * @return 结果
     */
    public int insertPaymentSlips(PaymentSlips paymentSlips);

    /**
     * 修改付款单
     * 
     * @param paymentSlips 付款单
     * @return 结果
     */
    public int updatePaymentSlips(PaymentSlips paymentSlips);

    /**
     * 删除付款单
     * 
     * @param paymentId 付款单主键
     * @return 结果
     */
    public int deletePaymentSlipsByPaymentId(Long paymentId);

    /**
     * 批量删除付款单
     * 
     * @param paymentIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deletePaymentSlipsByPaymentIds(Long[] paymentIds);

    /**
     * 批量添加付款单
     * @param paymentSlipsList
     * @return
     */
    public int insertPaymentSlipsList(List<PaymentSlips> paymentSlipsList);

    /**
     * 通过最新的时间来查询付款单号
     * @return
     */
    public String selectPaymentOrder();

    /**
     * 核准
     * @param paymentIds
     * @param deleteStatus
     * @param paymentApplicant
     * @return
     */
    public int updatePaymentApplicant(@Param("paymentIds") Long[] paymentIds,@Param("deleteStatus") String deleteStatus, @Param("paymentApplicant") String paymentApplicant);

    /**
     * 查询付款单的数据
     * @param paymentIds
     * @return
     */
    public List<PaymentSlips> selectPaymentApplicantByPaymentId(@Param("paymentIds") Long[] paymentIds);

    /**
     * 过账
     * @param paymentIds
     * @param postingApplicant
     * @return
     */
    public int updatePostingApplicant(@Param("paymentIds") Long[] paymentIds,@Param("postingApplicant") String postingApplicant);
}
